import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from "../views/index/Index";
import Login from "../views/login/Login";
import Course from "../views/course/Course";
import Personal from "../views/person/Personal";
import Search from "../views/search/Search";
Vue.use(VueRouter)

const routes = [
  {
    path:'/',
    redirect:"/index"
  },
  {
    path: '/index',
    name: 'Index',
    component: Index
  },
  {
    path: '/search',
    name: 'Search',
    component: Search
  },
  {
    path: '/personal',
    name: 'Personal',
    component: Personal
  },
  {
    path: '/course',
    name: 'Coures',
    component: Course
  },
  {
    path: '/login',
    name: 'Login',
    component: Login
  },
  // {
  //   path: '/about',
  //   name: 'About',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  // }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
